package Lab15;

import java.util.ArrayList;
import java.util.List;

// 客户类：包括姓名，证件号，手机号，飞机信息
public class CustomerInfo {
    private String name;
    private String Id;
    private String phone;
    //客户可以有多个航班
//    private PlaneInfo planeInfo;
    private List<PlaneInfo> planeInfos = new ArrayList<PlaneInfo>();

    public  CustomerInfo() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return Id;
    }

    public void setId(String id) {
        Id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

//    public PlaneInfo getPlaneInfo() {
//        return planeInfo;
//    }
//
//    public void setPlaneInfo(PlaneInfo planeInfo) {
//        this.planeInfo = planeInfo;
//    }
    public List<PlaneInfo> getPlaneInfos() {
        return planeInfos;
    }
    public void setPlaneInfos(List<PlaneInfo> planeInfos) {
        this.planeInfos = planeInfos;
    }
    @Override
    public String toString() {
        return name  +
                "," + Id +
                ","+ phone +
                "," + planeInfos.toString();
    }
}
